/**
 * 
 */
package prototypes;

import static org.junit.Assert.*;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

/**
 * @author Matthew Johnstone <mjohnstone357@gmail.com>
 *
 */
public class TestPacket {

	@Before
	public void setUp() throws Exception {
	}

	@After
	public void tearDown() throws Exception {
	}

	@Test
	public void test() throws PacketParsingException {
		
		String inputText =
				"OPERATIONS_PACKET\n" +
				"NODE_1\n" +
				"NODE_2\n" +
				"MAPPING\n" +
				"MAPPING\n" +
				"12345\n" +
				"789\n";
				
		
		Packet p = new Packet(inputText);
		
		String outputText = p.toText();
		
		System.out.println(p);
		
		assertTrue(outputText.equals(inputText));
			
	}

}
